var G5_Airpump = Window05.extend({
	parent:null,
	flow:null,
	ctor:function (parent,flow, tag) {
		this._super(parent,flow, tag);
		this.parent=parent;
		this.flow=flow;
	},
	initSp:function (){
		this.airpump=new Button(this.rootNode,2,TAG_ITEM_AIRPUMP,"#equitment/airpump_big.png",this.eventMenuCallback,this);
		this.airpump.setPosition(cc.p(gg.c_width,gg.c_height));
		
		this.airpump_open=new Button(this.rootNode,3,TAG_BUTTON_AIRPUMPOPEN,"#equitment/airpump_open.png",this.eventMenuCallback,this);
		this.airpump_open.setPosition(cc.p(gg.c_width*1.078,gg.c_height*0.76));
		
		this.airpump_close=new Button(this.rootNode,3,TAG_BUTTON_AIRPUMPCLOSE,"#equitment/airpump_open.png",this.eventMenuCallback,this);
		this.airpump_close.setPosition(cc.p(gg.c_width*1.078, gg.c_height*0.76));
		this.airpump_close.setVisible(false);
	},
	eventMenuCallback:function(pSender){
		this.showDesc(pSender.getTag());
		if(cur_tool != TAG_BUTTON_HAND){
			// 描述
			return;
		}
		if(!this.flow.checkTag(pSender.getTag())){
			// 是否可以触发
			_.error();
			this.scene.tipLayer.updateScore(gg.score);
			return;
		} else {
			_.clever();
			this.scene.tipLayer.updateScore(gg.score);
		}
		var action = this.flow.flow.action;
		switch(pSender.getTag()){
		case TAG_BUTTON_AIRPUMPOPEN:
			this.flow.next();
			this.airpump_open.setVisible(false);
			this.close();
			break;
		case TAG_BUTTON_AIRPUMPCLOSE:
			this.flow.next();
			this.airpump_close.setVisible(false);
			this.close();
			break;
		default:
			break;
		}
	}
});